-- card: 33669 from stack: in.2r -- bmap block id: 0 -- flags: 0000 -- background id: 3837 -- name: FileType -- part 2 (button) -- low flags: 00 -- high flags: A004 -- rect: left=386 top=269 right=293 bottom=471 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: try me ----- HyperTalk script ----- on mouseUp if the optionkey is down then edit script of me put filename() into temp if temp is empty then exit mouseup put FileType(temp) end mouseUp -- part contents for background part 5 ----- text ----- FileType -- part contents for background part 6 ----- text ----- FileType lets you find out for any file its TYPE (or, in layman's terms, format). FileType can be used together with ChangeFileType* to change the type of a file. Other XCMDs of potential interest are FileName*, reNameFile*, FileCreator*, ChangeFileType*, & FileVisFlag*. -------------------------------------------- Q: Who invented me? A: Larry Wolfarth 2133 N. Lincoln St. Arlington, VA 22207 Q: Any limitations on my use? A: Just mention the name of my creator in a visible place if you use this XCMD for commercial purposes. [Note: My creator is not a lawyer, but my creator's wife is....] Q: What if you don't like me? A: You may (1) write the author & ask for the source code, (2) grumble but continue to use the XCMD as is, or (3) forget the whole thing. HOWEVER, you may NOT complain: you got what you paid for.... •••••••••••••••••••••••••••••••••••••• Reading suggestion: The 1988 Bill James Baseball Almanac-- for the thinking baseball fan! (Write my creator if you are interested in baseball games, simulations, etc. He'll get back to you). ••Note from Steve Drazga, Editor DevStack I would like to publicly thank Larry for sending in this contribution & supporting the Developer Stack. It was especially nice the way he formatted his contribution so all I had to do was paste it into the new issue. Way to go, Larry! -- part contents for background part 7 ----- text ----- Syntax: FileType(<"FullPathName"> ) returns a four letter code specifying the type (format ) of the file. -- part contents for background part 10 ----- text ----- 31